Description:
A floating-point operation may produce either a floating-point
infinity or a Not-a-Number (NaN) value. All operations with variables
whose value is NaN, produce NaN. The result of almost all operations
with infinity is infinity. Only if infinity is the second operand
in a division operation will the result be 0.0. FIN detects all
situations which produce a result as
infinity or NaN.
Incorrect:
procedure ex(x,y: double);
var z1,z2:double;
begin
if (x >= 0) and (y >= 0) then
if (x <= 0) and (y <= 0) then
begin
z1 := x / y; // NaN is produced
z2 := 1.0 / x; // positive infinity is produced
end;
end;